
%  1      
clc;
clear all;
x1=1;
x2=3;
x3=5;
x4=7;
x=input('   >>');
tic;
y1=(x>=x1)&(x<=x2);
y2=(x>=x3)&(x<=x4);
y= y1|y2;
if y
  disp('    ');
else
  disp('  ');
end;
toc

%  2      
%    '%', '|', '~' 
clc;
clear all;
x1=1;
x2=3;
x3=5;
x4=7;
x=input('   >>');
tic;
ok=false;
if (x>=x1)
  if (x<=x2)
    ok=true;
  end;
end;
if ok ~= true
  if (x>=x3)
     if (x<=x4)
       ok=true;
     end;
  end; 
end;
if ok == true
  disp('    ');
else
  disp('  ');
end;
toc


%  3      
clc;
clear all;
x1=1;
x2=3;
x3=5;
x4=7;
x=input('   >>');
tic;
if (x>=x1) & (x<=x2)
  disp('  e 1..3');
elseif (x>=x3)&(x<=x4)
  disp('  e 5..7');
else
  disp('  ');
end;
toc

%  4      
clc;
clear all;
x1=1;
x2=3;
x3=5;
x4=7;
x=input('    >>');
tic;
switch x
 case {1,2,3}
   disp('     : 1, 2  3');
 case {5,6,7}
   disp('     : 5, 6  7');
 otherwise
   disp('   : 1, 2,3, 5, 6  7');
end;
toc














